-
Notifications
You must be signed in to change notification settings - Fork 50
Log the difference in taupage.yaml on startup #207
Log the difference in taupage.yaml on startup #207
Conversation
For the stateful applications it might be helpful to have the changes to Taupage configurtion in the EC2 instance user data to be logged across restarts. Using diff with zero lines of unified context: we are only interested in the changed values.
Hmm, that does not honor masking sensitive information 😞 |
i.e. it would log potentially sensitive information (e.g. think about Plan B Cassandra admin password) to the logging provider => not good |
This is sent to cloud-init-output.log. does this get uploaded to log A password will be logged only if it was changed, and yes we can try to On Tue, Apr 12, 2016, 17:07 Henning Jacobs [email protected] wrote:
|
@a1exsh can you check syslog (which is pushed to log provider)? |
Nothing from that is logged to syslog. The password will be logged to that could-init-output.log though on first bootup I think. |
util.write_file(TMP_TAUPAGE_CONFIG, config_yaml, 0o444) | ||
|
||
LOG.debug("Comparing current configuration with the old one...") | ||
subprocess.call(['diff', '-u0', TAUPAGE_CONFIG, TMP_TAUPAGE_CONFIG]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will fail the first time (/meta/taupage.yaml not there yet)? would be annoying to see an error in the logs..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yes, good point. Will fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, should it not be throwing an error earlier when it tries to read the config with:
LOG.debug("Loading existing configuration...")
config_yaml = util.read_file_or_url(TAUPAGE_CONFIG)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes, we always have a /meta/taupage.yaml containing default values (created during Taupage AMI build).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good, then there's nothing to change at this line. :-)
Looks good to me 👍 |
For the stateful applications it might be helpful to have the changes
to Taupage configurtion in the EC2 instance user data to be logged
across restarts.
Using diff with zero lines of unified context: we are only interested
in the changed values.